﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TalentPool.master" Inherits="WebManager.BasePage" %>

<%@ Import Namespace="TalentPools.BLL" %>
<%@ Import Namespace="TalentPools.Model" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<script runat="server">
    
    protected void btnsreach_Click(object sender, ImageClickEventArgs e)
    {
        string keyword = Request["keyword"];
        if (keyword == "输入任意关键字")
        {
            keyword = "%";
        }
        ViewState["keyword"] = keyword;
        AspNetPager1.RecordCount = new Company_BaseMeansManager().GetPageCount(keyword);
        DataBind1();
    }
    public void DataBind1()
    {
        RP1.DataSource = new Company_BaseMeansManager().GetCompanyByPage(Convert.ToInt32(ViewState["PageIndex"]), 10, ViewState["keyword"].ToString());
        RP1.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            ViewState["PageIndex"] = 1;//默认第一页
            ViewState["keyword"] = "";//默认关键词为空字符串
            AspNetPager1.RecordCount = new Company_BaseMeansManager().GetPageCount(ViewState["keyword"].ToString());
            DataBind1();

        }
    }
    protected void anpBookPage_PageChanging(object src, PageChangingEventArgs e)
    {
        ViewState["PageIndex"] = e.NewPageIndex;
    }

</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="css/Admin_Style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .hide
        {
            display: none;
        }
    </style>
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#show").click(function () {
                $("#trhide").show(1000);
            })
            $("#hide").click(function () {
                $("#trhide").hide("fast");
            })
        })
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="margin: 0 auto">
        <div id="search" style="width: 970px;">
            <table style="margin: 0px auto; %">
                <tr>
                    <td>
                        关 键 字:
                    </td>
                    <td>
                        <input maxlength="20" style="height: 20px; width: 149px;" type="text" name="keyword"
                            onblur="if(this.value=='') this.value='输入任意关键字';" onfocus="if(this.value=='输入任意关键字') this.value='';"
                            value="输入任意关键字" />
                        <asp:ImageButton ID="btnsreach" runat="server" CssClass="txtBox" ImageUrl="~/img/17.gif"
                            OnClick="btnsreach_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <table width="970px" style="margin: 0px auto" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td valign="top">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="78%" valign="top">
                                <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tableStyle">
                                    <tr>
                                        <td height="27" bgcolor="#3783FF" class="myqzzpTD">
                                            企业展示
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height: 56px; width: 100%">
                                            <table width='100%' border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                                                <tr class='topbg2'>
                                                    <td width="12%" align='center'>
                                                        <strong class="Glow">企业编号</strong>
                                                    </td>
                                                    <td width="14%" align='center'>
                                                        <strong class="Glow">企业名称</strong>
                                                    </td>
                                                    <td width="11%" align='center'>
                                                        <strong class="Glow">企业性质</strong>
                                                    </td>
                                                    <td width="10%" align='center'>
                                                        <strong class="Glow">所属行业</strong>
                                                    </td>
                                                    <td width="14%" align='center'>
                                                        <strong class="Glow">企业人数</strong>
                                                    </td>
                                                    <td width="10%" align='center'>
                                                        <strong class="Glow">企业简介</strong>
                                                    </td>
                                                    <td width="23%" align='center'>
                                                        <strong class="Glow"></strong>
                                                    </td>
                                                </tr>
                                                <asp:Repeater ID="RP1" runat="server">
                                                    <ItemTemplate>
                                                        <tr class='tdbg' id='trhide1' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
                                                            <td width="12%" align='center'>
                                                                <%#Eval("Id") %>
                                                            </td>
                                                            <td width="14%" align='center'>
                                                                <%#Eval("QyName") %>
                                                            </td>
                                                            <td width="11%" align='center'>
                                                                <%#Eval("Qytype") %>
                                                            </td>
                                                            <td width="10%" align='center'>
                                                                <%#Eval("Qyhy") %>
                                                            </td>
                                                            <td width="14%" align='center'>
                                                                <%#Eval("Qyrscount") %>
                                                            </td>
                                                            <td width="10%" align='center'>
                                                                <%#Eval("Qyjj") %>
                                                            </td>
                                                            <td align="center">
                                                                <a id="show">点击展开</a>
                                                            </td>
                                                        </tr>
                                                        
                                                            <tr class='hide' id='trhide'>
                                                                <td colspan="7">
                                                                    <table width='100%' border='0' align='center' cellpadding='4' cellspacing='1' class='border'>
                                                                        <tr>
                                                                            <td width="12%" align='center'>
                                                                                <strong>企业中文名称</strong>
                                                                            </td>
                                                                            <td width="12%" align='center'>
                                                                                <%#Eval("QyName") %>
                                                                            </td>
                                                                            <td width="10%" align='center'>
                                                                                <strong>英文名称</strong>
                                                                            </td>
                                                                            <td width="13%" align='center'>
                                                                                <%#Eval("QyName_en") %>
                                                                            </td>
                                                                            <td width="10%" align='center'>
                                                                                <strong>成立时间</strong>
                                                                            </td>
                                                                            <td width="13%" align='center'>
                                                                                <%#Eval("Qycltime") %>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="9%" align='center'>
                                                                                <strong>营业执照</strong>
                                                                            </td>
                                                                            <td width="9%" align='center'>
                                                                                <%#Eval("Yyzz") %>
                                                                            </td>
                                                                            <td width="10%" align='center'>
                                                                                <strong>所属行业</strong>
                                                                            </td>
                                                                            <td width="13%" align='center'>
                                                                                <%#Eval("Qyhy") %>
                                                                            </td>
                                                                            <td width="10%" align='center'>
                                                                                <strong>性质</strong>
                                                                            </td>
                                                                            <td width="13%" align='center'>
                                                                                <%#Eval("Qytype") %>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="9%" align='center'>
                                                                                <strong>注册资金</strong>
                                                                            </td>
                                                                            <td width="9%" align='center'>
                                                                                <%#Eval("Qymoney") %>
                                                                            </td>
                                                                            <td width="10%" align='center'>
                                                                                <strong>法人代表</strong>
                                                                            </td>
                                                                            <td width="13%" align='center'>
                                                                                <%#Eval("Qyfrdb") %>
                                                                            </td>
                                                                            <td width="10%" align='center'>
                                                                                <strong>企业规模</strong>
                                                                            </td>
                                                                            <td width="13%" align='center'>
                                                                                <%#Eval("Qyrscount") %>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td width="9%" align='center'>
                                                                                <strong>企业简介</strong>
                                                                            </td>
                                                                            <td colspan="5" align='center'>
                                                                                <%#Eval("Qycltime") %>
                                                                            </td>
                                                                        </tr>
                                                                        <tr id='trhide2'><td colspan="6" style="text-align:right"><a id='hide'>收起</a></td></tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <div style="width: 95%; height: 30px; text-align: right;">
                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" FirstPageText="首页"
                            LastPageText="最后一页" OnPageChanging="anpBookPage_PageChanging" ShowBoxThreshold="10"
                            NextPageText="下一页" PrevPageText="上一页">
                        </webdiyer:AspNetPager>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
